package user_center.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import user_center.user.pojo.SystemUser;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ezio.Auditore
 * @since 2021-12-20
 */
public interface SystemUserMapper extends BaseMapper<SystemUser> {

    /**
     * 根据用户名查询用户信息
     * @param username
     * @return
     */
    @Select("select * from system_user where user_name = #{username}")
    SystemUser selectByUserName(@Param("username") String username);

    /**
     * 根据手机查询用户信息
     * @param userPhone
     * @return
     */
    @Select("select * from system_user where user_phone = #{userPhone}")
    SystemUser selectByPhone(@Param("userPhone")String userPhone);

    /**
     * 根据邮箱查询用户信息
     * @param userEmail
     * @return
     */
    @Select("select * from system_user where user_email = #{userEmail}")
    SystemUser selectByEmail(String userEmail);

    /**
     * 根据qq查询用户信息
     * @param userQq
     * @return
     */
    @Select("select * from system_user where user_qq = #{userQq}")
    SystemUser selectByQQ(String userQq);
}
